//
//  YHYAddCVButtonTableViewCell.m
//  Home
//
//  Created by 杨泓晔 on 16/5/18.
//  Copyright © 2016年 LanJue. All rights reserved.
//

#import "YHYAddCVButtonTableViewCell.h"

@implementation YHYAddCVButtonTableViewCell



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubView];
        self.contentView.backgroundColor = LV;
    }
    
    return self;
}

- (void)createSubView{
    
    self.contentView.backgroundColor = LV;
    self.button = [UIButton buttonWithType:UIButtonTypeCustom];
    self.button.backgroundColor = GH;
    self.button.layer.masksToBounds = YES;
    self.button.layer.cornerRadius = 5;
    self.button.tag=1001;
    [self.contentView addSubview:self.button];
    [self.button setTitle:@"保存" forState:UIControlStateNormal];
    [self.button addTarget:self action:@selector(goNext:) forControlEvents:UIControlEventTouchUpInside];
    [self.button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    // [self.button setTitleColor:HS forState:UIControlStateNormal];
    //    self.button.frame = CGRectMake(50.00*AUTO_WIDTH, 600.00*AUTO_WIDTH, 275.00*AUTO_WIDTH, 40.00*AUTO_WIDTH);
    [self.button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(40 * AUTO_HEIGHT);
        make.left.mas_equalTo(7 * AUTO_WIDTH);
        make.right.mas_equalTo(-7 * AUTO_WIDTH);
        make.height.mas_equalTo(40 * AUTO_HEIGHT);
        
    }];
    self.button.titleLabel.font = [UIFont fontWithName:@"Arial" size:TEXTCONTENTFONT * TEXTWEIGHT];
    


}

- (void)goNext:(UIButton *)btu{
    
    [self.delegate presentDelegate:btu.tag];
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
